str1=input("请输入一个字符串：")
lst1=[str1[x] for x in range(len(str1))]
b=set(lst1)
lst2=list(b)
lst2.sort()
for i in range(len(lst2)):
    a=lst1.count(lst2[i])
    if a==1:
        print(lst2[i]+":"+str(a)+" time",end="  ")
    else:
        print(lst2[i]+":"+str(a)+" times",end="  ")


